/**
 * 
 */
package com.iwords.service.object;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.Transient;

/**
 * @author       BOLIN.HBC 
 * @time         2011-4-30    
 * @description  热门句子-DO       
 */
@Entity
@Table(name = "hotsentences")
public class HotSentencesEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private Long wordid;
    private Long sentenceid;
    private Long rank;
    @Temporal(javax.persistence.TemporalType.TIME)
    private Date createtime;
    @Temporal(javax.persistence.TemporalType.TIME)
    private Date updatetime;
    @Transient
    private String sentences;
    @Transient
    private String paraphrase;

    /**
     * @return the paraphrase
     */
    public String getParaphrase() {
        if (paraphrase == null) {
            return null;
        }
        return paraphrase;
    }

    /**
     * @param paraphrase
     *            the paraphrase to set
     */
    public void setParaphrase(String paraphrase) {
        this.paraphrase = paraphrase;
    }

    /**
     * @return the sentences
     */
    public String getSentences() {
        return sentences;
    }

    /**
     * @param sentences the sentences to set
     */
    public void setSentences(String sentences) {
        this.sentences = sentences;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the wordid
     */
    public Long getWordid() {
        return wordid;
    }

    /**
     * @param wordid the wordid to set
     */
    public void setWordid(Long wordid) {
        this.wordid = wordid;
    }

    /**
     * @return the sentenceid
     */
    public Long getSentenceid() {
        return sentenceid;
    }

    /**
     * @param sentenceid the sentenceid to set
     */
    public void setSentenceid(Long sentenceid) {
        this.sentenceid = sentenceid;
    }

    /**
     * @return the rank
     */
    public Long getRank() {
        return rank;
    }

    /**
     * @param rank the rank to set
     */
    public void setRank(Long rank) {
        this.rank = rank;
    }

    /**
     * @return the createtime
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * @param createtime the createtime to set
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * @return the updatetime
     */
    public Date getUpdatetime() {
        return updatetime;
    }

    /**
     * @param updatetime the updatetime to set
     */
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final HotSentencesEntity other = (HotSentencesEntity) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 29 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
}